﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cofe.Core.Property;

namespace Cofe.Core.Dynamic
{
    public interface IDynamicPropertyInterfaceManager : ICofeService
    {
        IDynamicPropertyInterfaceProvider[] AllInterfaceProviders { get; }
        Type[] AllCastableInterfaces { get; }
        Type[] CastableInterfaces { get; }

        Type[] AllCastableContainers { get; }        

        bool CanCastAs<T>(IPropertyHost entry) where T : IDynamicInterface<IPropertyHost>;
        T CastAs<T>(IPropertyHost entry) where T : IDynamicInterface<IPropertyHost>;

        IEnumerable<Type> GetCastableInterfaces(IPropertyHost propertyHost,
            bool includeInheritedInterfaces = false);
    }
}
